Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Cloudflare turn servers #45

Merged
merged 1 commit into from
Nov 28, 2024
Merged

Add Cloudflare turn servers #45

merged 1 commit into from
Nov 28, 2024

Conversation

Brutus5000
Copy link
Member

@Brutus5000 Brutus5000 commented Nov 27, 2024

image

@Brutus5000 Brutus5000 force-pushed the feature/cloudflare-turn branch from 3118207 to 38b6b2a Compare November 27, 2024 23:14
@Brutus5000 Brutus5000 self-assigned this Nov 27, 2024
@Brutus5000 Brutus5000 requested a review from Sheikah45 November 27, 2024 23:15
import jakarta.ws.rs.core.HttpHeaders

@Priority(Priorities.AUTHENTICATION)
class ApiKeyAuthenticationRequestFilter(turnApiKey: String) : ClientRequestFilter {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am a little surprised we have to write our own filter for this, but seems like that is the way to do it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not just you!


@Singleton
class CloudflareSessionHandler(
cloudflareProperties: CloudflareProperties,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing val?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

val is only required if I access the variable after initialization. This is not the case here, this it is not required

Comment on lines +42 to +44
// A sample response looks like "stun:fr-turn1.xirsys.com"
// The java URI class fails to read host and port due to the missing // after the :
// Thus we "normalize" the uri, even though it is technically valid
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is true for cloudflare as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Surprisingly, they also have the exact same response structure for credential and username. Maybe it is part of the RFC

@Brutus5000 Brutus5000 merged commit f0700bd into main Nov 28, 2024
1 check passed
@Brutus5000 Brutus5000 deleted the feature/cloudflare-turn branch December 2, 2024 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants